package pers.ddx.rest.blog1.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import pers.ddx.rest.blog1.entity.User;
import pers.ddx.rest.blog1.service.UserService;

import java.util.List;

@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping(method = RequestMethod.GET, value = "/getUser")
    public List<User> getUser() {
        return userService.getUser();
    }
}
